+Sat Jun 5 23:07:30 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkentrycompletion.c: (gtk_entry_completion_init),
+ (gtk_entry_completion_list_enter_notify),
+ (gtk_entry_completion_list_motion_notify),
+ (_gtk_entry_completion_popup), (_gtk_entry_completion_popdown):
+ * gtk/gtkentryprivate.h: Add an ignore_enter flag and
+ use it as in the menu code to avoid the initial selection if
+ the window pops up under the pointer. (Anders Carlsson)
+
Sat Jun 5 20:05:39 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testmerge.c: Add a checkbox to queue an
+Sat Jun 5 23:07:30 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkentrycompletion.c: (gtk_entry_completion_init),
+ (gtk_entry_completion_list_enter_notify),
+ (gtk_entry_completion_list_motion_notify),
+ (_gtk_entry_completion_popup), (_gtk_entry_completion_popdown):
+ * gtk/gtkentryprivate.h: Add an ignore_enter flag and
+ use it as in the menu code to avoid the initial selection if
+ the window pops up under the pointer. (Anders Carlsson)
+
Sat Jun 5 20:05:39 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testmerge.c: Add a checkbox to queue an
+Sat Jun 5 23:07:30 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkentrycompletion.c: (gtk_entry_completion_init),
+ (gtk_entry_completion_list_enter_notify),
+ (gtk_entry_completion_list_motion_notify),
+ (_gtk_entry_completion_popup), (_gtk_entry_completion_popdown):
+ * gtk/gtkentryprivate.h: Add an ignore_enter flag and
+ use it as in the menu code to avoid the initial selection if
+ the window pops up under the pointer. (Anders Carlsson)
+
Sat Jun 5 20:05:39 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testmerge.c: Add a checkbox to queue an
+Sat Jun 5 23:07:30 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkentrycompletion.c: (gtk_entry_completion_init),
+ (gtk_entry_completion_list_enter_notify),
+ (gtk_entry_completion_list_motion_notify),
+ (_gtk_entry_completion_popup), (_gtk_entry_completion_popdown):
+ * gtk/gtkentryprivate.h: Add an ignore_enter flag and
+ use it as in the menu code to avoid the initial selection if
+ the window pops up under the pointer. (Anders Carlsson)
+
Sat Jun 5 20:05:39 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testmerge.c: Add a checkbox to queue an
gpointer user_data);
static void gtk_entry_completion_selection_changed (GtkTreeSelection *selection,
gpointer data);
-
+static gboolean gtk_entry_completion_list_enter_notify (GtkWidget *widget,
+ GdkEventCrossing *event,
+ gpointer data);
+static gboolean gtk_entry_completion_list_motion_notify (GtkWidget *widget,
+ GdkEventMotion *event,
+ gpointer data);
static void gtk_entry_completion_insert_action (GtkEntryCompletion *completion,
gint index,
const gchar *string,
g_signal_connect (priv->tree_view, "button_press_event",
G_CALLBACK (gtk_entry_completion_list_button_press),
completion);
+ g_signal_connect (priv->tree_view, "enter_notify_event",
+ G_CALLBACK (gtk_entry_completion_list_enter_notify),
+ completion);
+ g_signal_connect (priv->tree_view, "motion_notify_event",
+ G_CALLBACK (gtk_entry_completion_list_motion_notify),
+ completion);
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (priv->tree_view), FALSE);
gtk_tree_view_set_hover_selection (GTK_TREE_VIEW (priv->tree_view), TRUE);
g_signal_connect (priv->action_view, "button_press_event",
G_CALLBACK (gtk_entry_completion_action_button_press),
completion);
+ g_signal_connect (priv->action_view, "enter_notify_event",
+ G_CALLBACK (gtk_entry_completion_list_enter_notify),
+ completion);
+ g_signal_connect (priv->action_view, "motion_notify_event",
+ G_CALLBACK (gtk_entry_completion_list_motion_notify),
+ completion);
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (priv->action_view), FALSE);
gtk_tree_view_set_hover_selection (GTK_TREE_VIEW (priv->action_view), TRUE);
}
}
+static gboolean
+gtk_entry_completion_list_enter_notify (GtkWidget *widget,
+ GdkEventCrossing *event,
+ gpointer data)
+{
+ GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (data);
+
+ return completion->priv->ignore_enter;
+}
+
+static gboolean
+gtk_entry_completion_list_motion_notify (GtkWidget *widget,
+ GdkEventMotion *event,
+ gpointer data)
+{
+ GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (data);
+
+ completion->priv->ignore_enter = FALSE;
+
+ return FALSE;
+}
+
+
/* some nasty size requisition */
gboolean
_gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
if (GTK_WIDGET_MAPPED (completion->priv->popup_window))
return;
- completion->priv->may_wrap = TRUE;
-
+ completion->priv->ignore_enter = TRUE;
+
column = gtk_tree_view_get_column (GTK_TREE_VIEW (completion->priv->action_view), 0);
renderers = gtk_tree_view_column_get_cell_renderers (column);
gtk_widget_ensure_style (completion->priv->tree_view);
void
_gtk_entry_completion_popdown (GtkEntryCompletion *completion)
{
+ completion->priv->ignore_enter = FALSE;
+
gdk_pointer_ungrab (GDK_CURRENT_TIME);
gtk_grab_remove (completion->priv->popup_window);